<template>
  <div class="table" style="padding: 0 20px;">
    <div class="handle-box">
      <div class="handle-filter clearfix">
        <div class="fl">
          <div class="filter-item">
            <form class="filter-search" action>
              <input type="text" placeholder="请输入商品名称查询" maxlength="15">
              <button>
                <i class="el-icon-search"></i>
              </button>
            </form>
          </div>
          <div class="filter-item">
            <el-button type="danger" disabled>发送短信</el-button>
          </div>
        </div>
        <div class="fr">
          <div class="filter-item filter-item-last">
            <el-date-picker
              type="datetimerange"
              align="right"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :default-time="['00:00:00', '23:59:59']"
            ></el-date-picker>
          </div>
        </div>
      </div>
    </div>

    <el-table
      :data="tableData"
      border
      class="table"
      ref="multipleTable"
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="55" align="center"></el-table-column>
      <el-table-column prop="id" label="序号" sortable width="80" align="center"></el-table-column>
      <el-table-column prop="name" label="用户姓名"></el-table-column>
      <el-table-column prop="nickname" label="用户昵称" width="120"></el-table-column>
      <el-table-column prop="regurl" label="注册地址"></el-table-column>
      <el-table-column prop="logoTime" label="注册时间"></el-table-column>
      <el-table-column prop="joinTime" label="登录时间"></el-table-column>
      <el-table-column prop="monetary" label="消费金额"></el-table-column>
      <el-table-column prop="consumptionType" label="消费类型"></el-table-column>
      <el-table-column prop="consumptionNumber" label="消费次数"></el-table-column>
      <el-table-column prop="phoneNumber" label="手机号"></el-table-column>
      <el-table-column prop="consumptionRegion" label="消费地区"></el-table-column>
      <el-table-column label="操作">
        <template slot-scope="scope">
          <el-button size="mini" @click="send(scope.row)">发送短信</el-button>
        </template>
      </el-table-column>
    </el-table>

    <!-- 弹出框 发送短信 -->
    <el-dialog title="发送短信" :visible.sync="VisibleNote" width="600px">
      <el-form inline="inline" :model="noteForm" class="noteForm">
        <el-form-item label="短信内容" :label-width="formLabelWidth">
          <el-input type="textarea" v-model="noteForm.note" clearable></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="VisibleNote = false">取 消</el-button>
        <el-button type="primary" @click="VisibleNote">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      VisibleNote: false,
      tableData: [
        {
          id: "1",
          name: "11",
          nickname: "22",
          regurl: "33",
          logoTime: "2019-05-01 11:42:10",
          joinTime: "2019-05-01 11:42:10",
          monetary: "66",
          consumptionType: "77",
          consumptionNumber: "88",
          phoneNumber: "99",
          consumptionRegion: "10"
        }
      ],
      noteForm: {
        note: ""
      }
    };
  },
  methods: {
    //发送
    send() {
      this.VisibleNote = true;
    }
  }
};
</script>

<style scoped> 
</style>